package com.ruoyi.teaching.service.impl;

import com.ruoyi.teaching.domain.TaskHistory;
import com.ruoyi.teaching.domain.dto.ActivityDto;
import com.ruoyi.teaching.mapper.TaskHistoryMapper;
import com.ruoyi.teaching.service.ITaskHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 任务说明Service业务层处理
 * 
 * @author thl
 * @date 2024-01-05
 */
@Service
public class TaskHistoryServiceImpl implements ITaskHistoryService 
{
    @Autowired
    private TaskHistoryMapper taskHistoryMapper;

    /**
     * 查询任务说明
     * 
     * @param id 任务说明主键
     * @return 任务说明
     */
    @Override
    public TaskHistory selectTaskHistoryById(Long id)
    {
        return taskHistoryMapper.selectTaskHistoryById(id);
    }

    /**
     * 查询任务说明列表
     * 
     * @param taskHistory 任务说明
     * @return 任务说明
     */
    @Override
    public List<TaskHistory> selectTaskHistoryList(TaskHistory taskHistory)
    {
        return taskHistoryMapper.selectTaskHistoryList(taskHistory);
    }

    /**
     * 新增任务说明
     * 
     * @param taskHistory 任务说明
     * @return 结果
     */
    @Override
    public int insertTaskHistory(TaskHistory taskHistory)
    {
        return taskHistoryMapper.insertTaskHistory(taskHistory);
    }

    /**
     * 修改任务说明
     * 
     * @param taskHistory 任务说明
     * @return 结果
     */
    @Override
    public int updateTaskHistory(TaskHistory taskHistory)
    {
        return taskHistoryMapper.updateTaskHistory(taskHistory);
    }

    /**
     * 批量删除任务说明
     * 
     * @param ids 需要删除的任务说明主键
     * @return 结果
     */
    @Override
    public int deleteTaskHistoryByIds(Long[] ids)
    {
        return taskHistoryMapper.deleteTaskHistoryByIds(ids);
    }

    /**
     * 删除任务说明信息
     * 
     * @param id 任务说明主键
     * @return 结果
     */
    @Override
    public int deleteTaskHistoryById(Long id)
    {
        return taskHistoryMapper.deleteTaskHistoryById(id);
    }

    @Override
    public List<TaskHistory> selectActivityList(ActivityDto activityDto) {

        return taskHistoryMapper.selectTaskHistory(activityDto);
    }


}
